﻿@inherits Nancy.ViewEngines.Razor.NancyRazorViewBase<dynamic>

@{
    Layout = "_Layout.cshtml";
}

@section breadcrumbs
{
    <div class="breadcrumbs" id="breadcrumbs">
        <script type="text/javascript">
            try { ace.settings.check('breadcrumbs', 'fixed') } catch (e) { }
        </script>

        <ul class="breadcrumb">
            <li>
                <i class="icon-home home-icon"></i>
                <a href="/console">控制台</a>
            </li>
            <li>
                <i class="icon-gears"></i>
                系统管理
            </li>
            <li>
                <a href="/admin">管理员设置</a>
            </li>
            <li class="active"><a href="/admin/edit/@Model.Id">编辑管理员</a></li>
        </ul><!-- .breadcrumb -->
        @Html.Partial("_Version")
    </div>
}

<div class="page-content">
    <div class="page-header">
        <h1>
            编辑用户
        </h1>
    </div>

    <form method="POST" action="/admin/edit" id="adminForm">
        <input type="hidden" name="Id" value="@Model.Id"/>
        <div class="row">
            <div class="col-xs-12">
                <div class="form-horizontal">
                    <div class="form-group">
                        <label class="col-sm-2 control-label no-padding-right">
                            管理员账号
                        </label>
                        <div class="col-sm-9">
                            <input class="col-xs-10 col-sm-5" name="Account" id="Account" placeholder="请填写用户登录账号" type="text" maxlength="20" required="required" value="@Model.Account" readonly="readonly"/>
                        </div>
                    </div>
                    <div class="space-4"></div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label no-padding-right">
                            管理员密码
                        </label>
                        <div class="col-sm-9">
                            <input class="col-xs-10 col-sm-5" name="Password" id="Password" placeholder="请填写用户登录密码" type="password" maxlength="20" required="required" value="@Model.Password" />
                        </div>
                    </div>
                    <div class="space-4"></div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label no-padding-right">
                            管理员昵称
                        </label>
                        <div class="col-sm-9">
                            <input class="col-xs-10 col-sm-5" name="Nick" id="Nick" placeholder="请填写用户昵称" type="text" maxlength="20" value="@Model.Nick"/>
                        </div>
                    </div>
                    <div class="space-4"></div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label no-padding-right">
                            管理员邮箱
                        </label>
                        <div class="col-sm-9">
                            <input class="col-xs-10 col-sm-5" name="Email" id="Email" placeholder="请填写用户邮箱" type="email" maxlength="50" value="@Model.Email"/>
                        </div>
                    </div>
                    <div class="space-4"></div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label no-padding-right">
                            管理员状态
                        </label>
                        <div class="col-sm-9">
                            @if (Model.Status == 0)
                            {
                                <input class="ace ace-switch ace-switch-3" name="StatusV" id="StatusV" type="checkbox" />
                            }
                            else
                            {
                                <input class="ace ace-switch ace-switch-3" name="StatusV" id="StatusV" type="checkbox" checked="checked" />
                            }
                            
                        </div>
                    </div>
                    <div class="space-4"></div>
                </div>
            </div>
        </div>

        <div class="row">
            <div class="clearfix form-actions">
                <div class="col-md-offset-3 col-md-9">
                    <button class="btn btn-info" type="submit">
                        <i class="icon-ok bigger-110"></i>
                        确定保存
                    </button>
                    <button class="btn" type="reset">
                        <i class="icon-refresh bigger-110"></i>
                        重置
                    </button>
                    <a class="btn btn-success" href="/admin">
                        <i class="icon-angle-left bigger-110"></i>
                        返回列表
                    </a>
                </div>
            </div>
        </div>
    </form>
</div>

@section PageScript
{
    <script src="~/Content/assets/page/admin.js" type="text/javascript"></script>
}